<script type="text/javascript"><!--//--><![CDATA[//><!--

	var grid_reload = function(){
		$('#datagrid').datagrid('reload', $('#fm_search').serializeObject());
	};

	$(document).ready(function() {

		// Setup Datagrid
		$('#datagrid').datagrid({  
			url:gs_path+'/'+controller+'/getdata', 
			queryParams: $('#fm_search').serializeObject(), 
			height:340,
			pagination:true,
			columns:[[
				{ field : 'ck', checkbox:true, width: 40, align: 'center' },				
				{ field : 'kode_mitra', title : 'Kode Mitra', width:170, sortable:true },
				{ field : 'ktp', title : 'KTP', width:170, sortable:true },
				{ field : 'situ', title : 'SITU', width:170, sortable:true },
				{ field : 'siup', title : 'SIUP', width:170, sortable:true },
				{ field : 'npwp', title : 'NPWP', width:170, sortable:true },	
				{ field : 'nama_pemilik', title : 'Nama Pemilik Mitra', width:200, sortable:true },	
				{ field : 'nama_toko_mitra', title : 'Nama Toko Mitra', width:200, sortable:true },
				{ field : 'alamat_lengkap', title : 'Alamat Lengkap', width:200, sortable:true },
				{ field : 'no_telp', title : 'No Telepon', width:150, sortable:true },
				{ field : 'no_hand', title : 'No Handphone', width:150, sortable:true },
				{ field : 'status_mitra', title : 'Status Mitra', width:150, sortable:true },
				{ field : 'no_kontrak', title : 'Nomor Kontrak', width:150, sortable:true },
				{ field : 'awal_kerja', title : 'Awal Kerja', width:150, sortable:true },
				{ field : 'akhir_kerja', title : 'Akhir Kerja', width:150, sortable:true },
				{ field : 'fee_mitra', title : 'Fee Mitra', width:150, sortable:true },
				{ field : 'no_rekening', title : 'Nomer Rekening', width:150, sortable:true },
				{ field : 'nama_bank', title : 'Nama Bank', width:150, sortable:true },
				{ field : 'atas_nama', title : 'Atas Nama', width:150, sortable:true },
				]
			]
		});
		 
		
		// Set Action Button
		var buttons = [ // ----- >> Print Excel Button
                        { label: 'Print Semua', icon: 'print', onclick: function() { 
							window.location = gs_path + '/pro_print_excel_new/data_mitra_aktif_all';
                        }},
					   ];
		setAction(buttons);
		
		
		$('#fm_search').focusFirst();
	});
//--><!]]></script>

<div id="tb" style="padding:5px;height:auto">
    <div>
        <form id="fm_search" onsubmit="grid_reload(); return false;">
        	<table class="tb_form" style="margin-bottom:0px">
            <tr>
            	<td width="100">Keyword</td>
                <td><input type="text" id="keyword" name="keyword" class="textfield medium" />
                	<a href="#" class="easyui-linkbutton" iconCls="icon-search" onclick="grid_reload(); return false;">Search</a>
                </td>
            </tr>
            </table>
        </form>
    </div>
</div>
<div id="datagrid" toolbar="#tb"></div>

